openapi: 3.0.1
info:
  title: Section 68 - Council to ePlanning API
  description: >
    # Authentication    


    Please use the subscription key provided by the Department to access the
    APIs.
  contact: {}
  version: v1
servers:
  - url: https://api-uat.apps1.nsw.gov.au/planning/onlineS68/v1
paths:
  /AcceptReturn/{CaseID}:
    put:
      summary: AcceptReturn
      description: >-
        This operation transfers the Council's decision to proceed or not
        proceed the section 68 Certificate case from Council's IT system to the
        Online Section 68 Service.
      operationId: put-AcceptReturn-caseid
      parameters:
        - name: CaseID
          in: path
          description: A fully qualified Section 68 of the Local Government Act case
          required: true
          schema:
            type: string
        - name: OrganisationID
          in: header
          description: >-
            The council LGA name to indicate where the request is originated
            from.
          required: true
          schema:
            type: string
        - name: IdempotencyID
          in: header
          description: >-
            Unique Id for this request. Allows the API to respond in an
            idempotent way if it has already been called with these parameters
            and prevents duplicate processing. Typically a UUID such as
            "63a9ba30-7a4b-4fac-b343-d1f05cf089f1"
          required: true
          schema:
            type: string
      requestBody:
        description: Information request object
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CompletenessCheck'
        required: true
      responses:
        '200':
          description: Case updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcceptResponse'
        '400':
          description: Invalid request supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Case not found or locked by another user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      deprecated: false
      x-codegen-request-body-name: body
  /Determination/{CaseID}:
    put:
      summary: Determination
      description: >-
        This operation transfers the Council's determination decision to proceed
        or not proceed the Section 68 Certificate case from Council's IT system
        to the Online Section 68 Service.
      operationId: put-Determination-caseid
      parameters:
        - name: CaseID
          in: path
          description: A fully qualified Section 68 of the Local Government Act case
          required: true
          schema:
            type: string
        - name: OrganisationID
          in: header
          description: >-
            The council LGA name to indicate where the request is originated
            from.
          required: true
          schema:
            type: string
      requestBody:
        description: Determination request object
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Determination'
        required: false
      responses:
        '200':
          description: Case updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
        '400':
          description: Invalid request supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Case not found or locked by another user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      deprecated: false
      x-codegen-request-body-name: body
components:
  schemas:
    Determination:
      title: Determination
      required:
        - determinationOutcome
        - updatedByEmail
      type: object
      properties:
        determinationOutcome:
          $ref: '#/components/schemas/DeterminationOutcome'
        determinationDate:
          type: string
          description: >-
            Certificate Determination Date .Conditional mandatory when
            "DeterminationOutcome" is "Approved" or "Deferred Commencement". It
            can not be a future date.
          format: date
          example: '2020-09-10'
        certificateRefusalReason:
          maxLength: 512
          type: string
          description: >-
            The reason council Refused the Certificate. Conditional mandatory
            when "DeterminationOutcome" is "Refused".
        certificateRefusalDate:
          type: string
          description: >-
            Application refused date. Conditional mandatory when
            "DeterminationOutcome" is "Refused". It can not be a future date.
          format: date
          example: '2020-01-04'
        certificateDeferredReason:
          maxLength: 512
          type: string
          description: >-
            Deferred Commencement Details. Conditional Mandatory  when
            "DeterminationOutcome" is "Deferred Commencement".
        Documents:
          type: array
          items:
            $ref: '#/components/schemas/DownloadableDocument'
        updatedByEmail:
          $ref: '#/components/schemas/UpdatedByEmail'
    CompletenessCheck:
      title: Completeness Check
      required:
        - outcomeOfReview
        - updatedByEmail
      type: object
      properties:
        outcomeOfReview:
          $ref: '#/components/schemas/ReviewOfOutcome'
        isFeePaid:
          type: boolean
          description: >-
            Applicant paid the relevant fees. Conditional Mandatory  when What
            is the outcome of your review? equals to:"Accept application for
            assessment"
        feeAmount:
          type: number
          description: >-
            Total fee paid. Conditional Mandatory when Applicant paid the
            relevant fees? equals to:"Yes"
          format: decimal
          example: 1250.9
        councilUniqueIDNumber:
          type: number
          description: >-
            Council unique identification number. Conditional Mandatory  when
            daFeePaid equals to:"Yes/No"
          maxLength: 20
        applicationLodgedDate:
          type: string
          description: >-
            Enter the date the application was lodged into the Council system.
            Conditional Mandatory  when Applicant paid the relevant fees equals
            to "Yes/No". Date of lodgement can not be a future date
          format: date
          example: '2020-12-30'
        rejectReason:
          maxLength: 512
          type: string
          description: >-
            Reason for return the applicaion by council. Conditional Mandatory
            when What is the outcome of your review? is equals to "Application
            returned"
        rejectDate:
          type: string
          description: >-
            applcation rejected date by council. Conditional Mandatory  when
            What is the outcome of your review? is equals to "Application
            returned". It can not be a future date.
          format: date
          example: '2020-12-30'
        isAgencyAssessmentReq:
          type: boolean
          description: >-
            Does the application require consultation? Mandatory when What is
            the outcome of your review? is "Accept application for assessment"
        referralDetails:
          type: array
          description: >-
            Agencies to consult with. This is part of 'Section 68'. Applicable
            when- Does the application require consultation? is "Yes"
          items:
            $ref: '#/components/schemas/agencyToConsult'
        Documents:
          type: array
          items:
            $ref: '#/components/schemas/DownloadableDocument'
        updatedByEmail:
          $ref: '#/components/schemas/UpdatedByEmail'
    DownloadableDocument:
      title: DownloadableDocument
      required:
        - documentName
        - documentType
        - documentURL
        - uploadedDateTime
      type: object
      properties:
        documentName:
          maxLength: 150
          type: string
          description: documentName has to be appended with file extension
          example: test.docx
        documentType:
          maxLength: 100
          type: string
        uploadedDateTime:
          type: string
          format: date-time
        documentURL:
          maxLength: 500
          type: string
          description: URL of the document to be downloaded
          example: https://api-tst.apps1.nsw.gov.au/planning/external/v1/Documents/Doc2
    UpdatedByEmail:
      title: UpdatedByEmail
      type: string
      description: user mail address who performing the action.
    DeterminationOutcome:
      title: This application has been assessed and has been
      type: string
      description: >-
        This application has been assessed and has been Approved or Refused or
        Deferred Commencement. One of the below mentioned values must be
        selected for DeterminationOutcome 1. Approved 2. Refused 3. Deferred
        Commencement
      example: Refer to description for values
    agencyToConsult:
      title: agencyToConsultWith
      type: object
      properties:
        agencyName:
          type: string
          description: >-
            Mandatory when Does the application require consultation? is "Yes".
            It refers to which agency is the activity being referred? One of the
            below mentioned values must be selected for agencyName 1. Liquor &
            Gaming NSW 2. NSW Police - Camden PAC 3. NSW Police - Hunter Valley
            PD 4. NSW Police - Mid North Coast PD 5. NSW Police - Nepean PAC 6.
            NSW Police - Parramatta PAC 7. NSW Police - Riverina PD 8. NSW
            Police - Tweed Byron PD 9. Roads and Maritime Service 10. Transport
            for NSW 11. NSW Police - Ryde PAC
          example: Refer to description for values
        dueDate:
          type: string
          description: Referral dueDate
          format: date
          example: '2020-12-30'
        reasonForReferral:
          maxLength: 512
          type: string
          description: Please clearly explain why this referral is being made
      description: Add agency
    ReviewOfOutcome:
      title: ReviewOfOutcome
      type: string
      description: >-
        What is the outcome of your review, Accept application for assessment or
        Application returned. One of the below mentioned values must be selected
        for ReviewOfOutcome 1. Accept application for assessment 2. Application
        returned
      example: Refer to description for values
    Response:
      type: object
      properties:
        statusCode:
          type: integer
          example: 200
        message:
          type: string
        activityId:
          type: string
        Documents:
          type: array
          description: Attached documents with eplanningDocIds.
          items:
            $ref: '#/components/schemas/DocResponse'
    AcceptResponse:
      type: object
      properties:
        statusCode:
          type: integer
          example: 200
        message:
          type: string
        activityId:
          type: string
        Referral Cases:
          type: array
          description: Applicable when isAgencyAssessmentReq=="Yes"
          items:
            $ref: '#/components/schemas/RefCaseDetails'
        Documents:
          type: array
          description: Attached documents with eplanningDocIds.
          items:
            $ref: '#/components/schemas/DocResponse'
    DocResponse:
      title: DocResponse
      type: object
      properties:
        documentName:
          type: string
          description: documentName which was uploaded as part of respective API opeartion
          example: test.docx
        documentType:
          type: string
          description: Type of Document under which repsective document was uploaded
        eplanningDocId:
          type: string
          description: DocId of the respective document which was uploaded
        externalOrgDocURL:
          type: string
          description: URL of the document which was uploaded
    Error:
      title: Error
      required:
        - errorCode
        - statusCode
      type: object
      properties:
        statusCode:
          type: integer
          format: int32
          example: 404
        message:
          type: string
          example: Internal Server error 19876
        activityId:
          type: string
          example: 00000011-0ab-xy00-0000-500000000000
        errorCode:
          type: string
          example: DPE_TMS01
        errorDetails:
          type: string
          example: Inner Exceptions, Stack Trace, etc
    RefCaseDetails:
      title: Referral Case Details
      type: object
      properties:
        RefCaseID:
          type: string
          description: Referral case id created when isAgencyAssessmentReq=="Yes"
          example: REF-XXX
